SET QUOTED_IDENTIFIER OFF;
GO
USE [image];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO


ALTER TABLE [dbo].[ImageUserTag] DROP CONSTRAINT [FK_ImageUserTag2];

-- Creating foreign key on [image_user_tagid] in table 'ImageUserTag'
ALTER TABLE [dbo].[ImageUserTag]
ADD CONSTRAINT [FK_ImageUserTag2]
    FOREIGN KEY ([imageid])
    REFERENCES [dbo].[Image]
        ([imageid])
    ON DELETE NO ACTION ON UPDATE NO ACTION;
GO
